"""
@Project:study_platform
@File:pamongo.py
@Author:韩晓雷
@Date:9:43
"""
import pymongo

myclient = pymongo.MongoClient('mongodb://localhost:27017/')
mydb = myclient["runoobdb"]

mycol = mydb["run"]

# mylist = [
#   { "_id": 1, "name": "RUNOOB", "cn_name": "菜鸟教程"},
#   { "_id": 2, "name": "Google", "address": "Google 搜索"},
#   { "_id": 3, "name": "Facebook", "address": "脸书"},
#   { "_id": 4, "name": "Taobao", "address": "淘宝"},
#   { "_id": 5, "name": "Zhihu", "address": "知乎"}
# ]
# x = mycol.insert_many(mylist)
# print(x)
# print(x)

a = {"name": "shuang", "age": 16, "gender": "男"}

for i in a.items():
    print("i", i)

gender = "女"
hai = "先生 您好" if gender == "男"  else "女士 您好"
print("hai", hai)















